/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package angrypainters.application;

import angrypainters.components.ResourceManager;
import angrypainters.components.ScreensManager;
import javafx.application.Application;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

/**
 *Application class of the game. All Javafx application must start from this class
 * @author Ahmed
 */
public class AngryPainters extends Application {
    double housepositionX, housepositionY = 0;
    SimpleDoubleProperty markXProperty = new SimpleDoubleProperty();
    SimpleDoubleProperty markYProperty = new SimpleDoubleProperty();
    ScreensManager controller;
    ResourceManager manager;
    
    @Override
    public void start(final Stage primaryStage) {
        controller=new ScreensManager();
        Group mainGroup = new Group();
        final StackPane root = new StackPane();
        mainGroup.getChildren().add(root);
        Scene scene = new Scene(controller, 1200, 650);
        manager=new ResourceManager();
        manager.setSc(controller);
        manager.setInstance(manager);
        controller.addScreen("splash", manager.getSplash());
        primaryStage.setTitle("Angry Painterz!");
       // primaryStage.initStyle(StageStyle.UNDECORATED);
        primaryStage.setResizable(false);
        controller.setScreen("splash");
        primaryStage.setScene(scene);
        primaryStage.show();
       manager.animateSplash();
    }

    /**
     * The main() method is ignored in correctly deployed JavaFX application.
     * main() serves only as fallback in case the application can not be
     * launched through deployment artifacts, e.g., in IDEs with limited FX
     * support. NetBeans ignores main().
     *
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        launch(args);
    }

}
